<?php
 mysql_connect('localhost','root','123456') or die('ddd');
 mysql_select_db('cms123');
 $sql="select * from admin where `AName`='administrator'";
 
 $result = mysql_query($sql);
 if($result){
   echo "ok";
 }else{
   echo 'error';
 }
 $row = mysql_fetch_array($result);
 print_r($row);
 
?>